﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IndexView.aspx.cs" Inherits="IndexView" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>KM报表平台使用情况分析</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="CrispTouch" />
        <div style="width: 100%; text-align: center;">
            <h1>
                KM报表平台使用情况分析</h1>
        </div>
        <ext:Panel ID="Panel1" runat="server" Layout="VBox" Width="1000">
            <Items>
                <ext:Panel ID="Panel2" runat="server" Title="用户操作排行榜" Layout="FitLayout">
                    <Items>
                        <ext:CartesianChart ID="CartesianChart1" runat="server" Width="900" Height="6000"
                            Shadow="true" FlipXY="true">
                            <Store>
                                <ext:Store ID="Store2" runat="server">
                                    <Model>
                                        <ext:Model ID="Model1" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="username" />
                                                <ext:ModelField Name="num" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <Axes>
                                <ext:NumericAxis Fields="num" Position="Bottom" Grid="true" Title="用户操作排行榜"
                                    Minimum="0">
                                    <Renderer Handler="return Ext.util.Format.number(label, '0,0');" />
                                </ext:NumericAxis>
                                <ext:CategoryAxis Fields="username" Position="Left" />
                            </Axes>
                            <Series>
                                <ext:BarSeries Highlight="true" XField="username" YField="num">
                                    <Label Display="InsideEnd" Field="num" Orientation="Horizontal" Color="#333" TextAlign="Center" />
                                </ext:BarSeries>
                            </Series>
                        </ext:CartesianChart>
                    </Items>
                </ext:Panel>
                
            </Items>
        </ext:Panel>
        <ext:Panel ID="Panel3" runat="server" Height="300" Width="1400" Title="模块使用分析" Layout="FitLayout" OverflowX="Auto">
                    <Items>
                        <ext:CartesianChart ID="Chart1" runat="server" InsetPadding="30" Width="400">
                            <Store>
                                <ext:Store runat="server" ID="Store1">
                                    <Model>
                                        <ext:Model ID="Model2" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="modulename" />
                                                <ext:ModelField Name="num" />
                                                <ext:ModelField Name="acname" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <Axes>
                                <ext:NumericAxis Position="Left" Minimum="0" Fields="num" Grid="false">
                                    <Label Font="10px Arial" />
                                    <Renderer Handler="return Ext.util.Format.number(label, '0,0');" />
                                </ext:NumericAxis>
                                <ext:CategoryAxis Position="Bottom" Fields="modulename" Grid="false">
                                    <Label Font="11px Arial" />
                                    <Renderer Handler="return label.substr(0, 7)+'...';" />
                                    <Label RotationDegrees="-40" />
                                </ext:CategoryAxis>
                            </Axes>
                            <Series>
                                <ext:LineSeries XField="modulename" YField="num">
                                    <Listeners>
                                        <ItemMouseUp Handler="Ext.net.Notification.show({title:'Item Selected', html:item.value[1] + ' visits on ' + Ext.Date.monthNames[item.value[0]]});" />
                                    </Listeners>
                                    <Tooltip ID="Tooltip1" runat="server" TrackMouse="true">
                                        <Renderer Handler="this.setTitle(storeItem.get('modulename')+'<br/>'+storeItem.get('num') +'次');" />
                                    </Tooltip>
                                    <StyleSpec>
                                        <ext:Sprite StrokeStyle="#18428E"/>
                                    </StyleSpec>
                                    <Marker>
                                        <ext:CircleSprite Radius="4" LineWidth="0" FillStyle="#18428E" StrokeStyle="#18428E" />
                                    </Marker>
                                </ext:LineSeries>
                            </Series>
                        </ext:CartesianChart>
                    </Items>
                </ext:Panel>
    </div>
    </form>
</body>
</html>
